import React, { Component } from 'react'
import {
  View, TextInput, StyleSheet, Text, Image, SafeAreaView, Navigator, ScrollView, TouchableOpacity
} from 'react-native'
import NavBar from '../../../../components/PublicHeader';
import { Images } from '../../../../public/images/images'

export default class backgroundSettings extends Component {
  constructor(props) {
    super(props)
    this.state = {
      Generalsettingsss: this.props.navigation.state.params.Generalsettingsss,


    }


  }

  componentDidMount = () => {


  }

  onChangeText(text) {
    this.setState({
      searchText: text
    })
  };

  onClick() {

  }

  render() {
    return (
      <SafeAreaView style={styles.container}>
        <NavBar
          navigation={this.props.navigation}
          title={"聊天背景设置"}
        />
        <View style={styles.Generals}>
          {
            this.state.Generalsettingsss.map((item, index) => (
              <View key={index}  >
                <TouchableOpacity key={index} style={styles.General} onPress={() => (
                  this.props.navigation.navigate(item.url)
                )}>
                  <Text style={{ lineHeight: 40 }}>{item.name}</Text>
                  <Text style={{ lineHeight: 30, marginRight: '7%', }}><Image source={require('../../../../assets/images/maillist/Vector.png')}  ></Image></Text>
                </TouchableOpacity>
              </View>
            ))}
        </View>
      </SafeAreaView >
    )
  }
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    display: 'flex',
    textAlign: 'center'
  },
  layer: {
    display: 'flex',
    justifyContent: 'space-around'
    , alignItems: 'center',
    flexDirection: 'row',
    marginTop: 80

  },
  General: {
    flexDirection: 'row', height: 40, lineHeight: 40, marginLeft: '7%', justifyContent: 'space-between',
    borderBottomWidth: 1,
    borderBottomColor: '#f2f2f2'
  },
  Generals: {
    marginTop: '4%', backgroundColor: 'white'
  }

})